# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=yasm
pkgver=1.3.0
pkgrel=2
pkgdesc="A rewrite of NASM to allow for multiple syntax supported (NASM, TASM, GAS, etc.)"
url="http://www.tortall.net/projects/yasm/"
arch="all"
license="BSD-2-Clause"
subpackages="$pkgname-dev $pkgname-doc"
source="http://www.tortall.net/projects/yasm/releases/yasm-$pkgver.tar.gz
	74184586228af6c362f970c84fce58da3fcbdec8.patch"

prepare() {
	default_prepare
	update_config_sub
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr
	make
}

check() {
	make -j1 check
}

package() {
	make DESTDIR="$pkgdir" install
	install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}

sha512sums="572d3b45568b10f58e48f1188c2d6bcbdd16429c8afaccc8c6d37859b45635e106885d679e41d0bee78c23822108c7ae75aa7475eed5ba58057e0a6fe1b68645  yasm-1.3.0.tar.gz
e0220f7d29a83fc107dfb134dad29c3246fdaa2bcba4a1182fb93e9fd810c53cc97062771c26ee4a34d5e8dea1feb3094647bdc68b4d45734a062eb8d4afa3d1  74184586228af6c362f970c84fce58da3fcbdec8.patch"
